package generators;

import java.util.Random;

import gamebackend.Block;
import generators.BlockGenerator;

/**
 * This is meant for showing stars in the background, and does not have anything to do with flight paths.
 * @author Jonathan Caddey
 *
 */
public class StarGenerator extends AbstractRandomGenerator {
	

	public StarGenerator(Block the_block, Random the_random,
			double the_chance) {
		super(the_block, the_random, the_chance);
	}

	@Override
	public void generate(Block[][] blocks) {
		while (getRandom().nextDouble() < getChance()) {
			blocks[0][(int)(getRandom().nextDouble() * blocks[0].length)] = getBlock();
		}
	}
	
}
